<div class="row">
  <div class="col-md-6">
    <form class="form-inline" (ngSubmit)="sendMessage()" #messageForm="ngForm">
      <label class="sr-only" for="message">Message</label>
      <input type="text" class="form-control" id="message" placeholder="your message..." name="message" [(ngModel)]="message" required>
      <button type="submit" class="btn btn-primary" [disabled]="!messageForm.valid">Send Message</button>
    </form>
  </div>
</div>

<hr>

<ul>
  <li *ngFor="let message of messages;">
    {{message}}
  </li>
</ul>
<div *ngIf=" messages.length <=0 ">
  <span>No messages</span>
</div>